import React from 'react';
import {
  G2,
  Chart,
  Geom,
  Axis,
  Tooltip,
  Coord,
  Label,
  Legend,
  View,
  Guide,
  Shape,
  Facet,
  Util
} from "bizcharts";

const RevenueChart = props => {
  const { x, y, data, useTool = false, style } = props
  return (
    <div style={style}>
      <Chart data={data} forceFit {...props}>
        <Axis name={x} />
        <Axis name={y} />
        <Tooltip
          crosshairs={{
            type: "y"
          }}
        />
        <Geom type="interval" position={`${x}*${y}`} />
      </Chart>
    </div>
  );
};

export default RevenueChart;